DragNDrop allows a scripter to easily implement dragging and dropping of "objects" within a single window. This XFCN works in HyperCard and SuperCard.
DragNDrop is intended to be used within a single window.
All that the programmer needs to provide to the DragAndDrop routine is an array of objects that the current object can be dropped into. DragAndDrop will take care of tracking the object, hiliting the rectangles as they are passed over, and returning the object id that the object was dropped onto.
DragDropNDoubleClick also allows a scripter to check for a double click on a button.
From a scriptors end, the command looks like this:
put DragAndDrop( fromObjectID, toObjectID1, ... , toObjectIDN ) into objectIDDroppedOn
- fromObjectID is the object that the user is dragging from.
- toObjectIDx are the objects that the user is dragging to. There may be a maximum of 15 objects to drag to.
- objectIDDroppedOn is the item descriptor that the user dropped on, or
empty if the user did not drop on any object.
- objectID's are in the form of "cd btn id 101" or "bg fld id 102". Do not use names of objects, or numbers of objects. Only ID's are acceptable.